package com.vainycos.lotterysearch.controller;

import com.vainycos.lotterysearch.model.base.Result;
import com.vainycos.lotterysearch.service.LuckyLotteryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: Vainycos
 * @description
 * @date: 2022/11/16 18:30
 */
@RestController
@RequestMapping("/luckyLottery")
public class LuckyLotterController {

    @Autowired
    private LuckyLotteryService luckyLotteryService;

    /**
     *
     * @param periodId
     * @param type
     * @return
     */
    @GetMapping("/insertByPeriodAndType")
    public Result insertByPeriodAndType(int periodId, String type){
        return Result.of(luckyLotteryService.insertByPeriodAndType(periodId, type));
    }

}
